import request from '@/utils/request'

//获取所有建议信息
export function getAllAdvice() {
	return request({
		'url': '/advice/info/SelectAllAdvice',
		'method': 'get'
	})
}

//获取我的建议SelectmyAdvice
export function getMyAdvice() {
	return request({
		'url': '/advice/info/SelectMyAdvice',
		'method': 'get'
	})
}

//根据id查询建议详细信息
export function getSelectAdviceById(id) {
	return request({
		'url': '/advice/info/SelectAdviceById/' + id,
		'method': 'get'
	})
}
//删除图片接口 
export function deleteImage(url) {
	return request({
		'url': '/system/oss/deleteImage?url=' + url,
		header: {
			'content-type': "application/x-www-form-urlencoded"
		},
		'method': 'put'
	})
}

//修改未回复建议

export function UpdateMyAdvice(data) {
	return request({
		'url': '/advice/info/UpdateMyAdvice',
		'method': 'put',
		'data': data
	})
}

//撤回建议
export function RecallMyAdvice(id) {
	return request({
		'url': '/advice/info/RecallMyAdvice/' + id,
		'method': 'put'
	})
}

//删除建议
export function DeleteMyAdvice(id) {
	return request({
		'url': '/advice/info/DeleteMyAdvice/' + id,
		'method': 'put'
	})
}

//修改未回复建议

export function AddMyAdvice(data) {
	return request({
		'url': '/advice/info',
		'method': 'post',
		'data': data
	})
}
